﻿using System;

namespace Sustainalytics.Entities
{
    public static class ReportNameExtensions
    {
        private const string DateFormat = "ddMMyyyy";

        public static string GetFullReportName(this ReportName reportName, string companyName, Guid companyId)
            => reportName.GetFullReportName(companyName, companyId.ToString());

        public static string GetFullReportName(this ReportName reportName, string companyName, DateTime date)
            => reportName.GetFullReportName(companyName, date.ToString(DateFormat));

        private static string GetFullReportName(this ReportName reportName, string companyName, string suffix)
            => $"{companyName.ToReportNameString()}_{reportName.GetDisplayName()}Report_{suffix}.pdf";
    }
}
